package com.zc.service.testImpl;

import com.zc.dao.OddsMapper;
import com.zc.entity.Odds;
import com.zc.service.OddService;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
@Cacheable(value = "myCache", key = "getMethodName()")
public class OddServiceImpl implements OddService {
    @Resource
    private OddsMapper oddsDao;
    @Override
    public List<Odds> findAll() {
       return oddsDao.findAll();
    }

    @Override
    public void saveOdds(Odds odd) {
        oddsDao.insertSelective(odd);
    }
}
